package com.piece.test;

import com.piece.core.elasticsearch.annotations.Document;
import com.piece.core.elasticsearch.annotations.Field;
import com.piece.core.framework.support.model.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.io.Serializable;

@Data
@NoArgsConstructor
@Document(indexName = "blog_article")
public class Article extends BaseEntity implements Serializable {

    @Id
    @Field
    private Long articleId;

    @Field(searchAnalyzer = true)
    private String title;

    @Field(searchAnalyzer = true)
    private String summary;

    @Field
    private Integer weight;

    @Transient
    @Field(searchAnalyzer = true)
    private String content;

    @Transient
    @Field(searchAnalyzer = true)
    private String html;
}
